# 配置函数
# 录入信息
def input_score(name: object) -> object:
    while True:
        name_ = input("Please input name:")
        ages = input('Please input ID:')
        score = input('Please input score:')
        #  print('姓名 \t {0} \t 年龄 \t {1} \t 成绩 \t {2}'.format(name_), format(ages), format(score))
        print('Name :{}'.format(name_),end='\t')
        print('Ages:{}'.format(ages),end='\t')
        print('Score:{}'.format(score),end='\n')

        score_table = open('D:/practice/{}.txt'.format(name),'a',encoding='utf8')
        score_table.write(name_)
        score_table.write('\t')
        score_table.write(ages)
        score_table.write('\t\t')
        score_table.write(score)
        score_table.write('\n')
        score_table.close()
        print('This information has input complete.')
        print('*' * 20)


        while True:

            print('If you would like to go on import something,please input (y) or (Y)')
            judge = input('是否继续录入信息:')
            judge_new = judge.upper()
            print(judge_new)

            if judge_new != 'Y':
                break
            else:
                input_score(name)
            print('此次录入完成')
            print(open('D:/practice/{}.txt'.format(name),'r',encoding='utf8').read())
            return
        input('按任意键返回')
        break

